home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Belgian Amiga Club - ADF Collection
/
BS1 part 26.zip
/
BS1 part 26
/
C for beginners.adf
/
source
/
window_intuition.c
< prev
next >
Wrap
C/C++ Source or Header
|
1978-01-17
|
1KB
|
57 lines
/* window_intuition.c 25.2.3 */
/* From Amiga C for Beginners */
/* by Abacus */
#include <exec/types.h>
#include <intuition/intuition.h>
extern struct window *Openwindow();/* Declaration */
extern long *OpenLibrary(); /* Hello Aztek-User */
struct IntuitionBase *IntuitionBase;
#define INTUITION_REV 0
main()
{
struct NewWindow NewWindow;
struct Window *Window;
long i;
IntuitionBase = (struct IntuitionBase *)
OpenLibrary("intuition.library", INTUITION_REV);
if(IntuitionBase == NULL)
exit(FALSE);
NewWindow.LeftEdge = 20;
NewWindow.TopEdge = 20;
NewWindow.Width = 200;
NewWindow.Height = 80;
NewWindow.DetailPen = 0;
NewWindow.BlockPen = 2;
NewWindow.IDCMPFlags = NULL;
NewWindow.Flags = SMART_REFRESH | ACTIVATE |
WINDOWSIZING | WINDOWDRAG | WINDOWDEPTH |
NOCAREREFRESH;
NewWindow.FirstGadget = NULL;
NewWindow.CheckMark = NULL;
NewWindow.Title = (UBYTE *)"The User window";
NewWindow.Screen = NULL;
NewWindow.BitMap = NULL;
NewWindow.MinWidth = 80;
NewWindow.MinHeight = 25;
NewWindow.MaxWidth = 640;
NewWindow.MaxHeight = 200; /* PAL - change to 256 */
NewWindow.Type = WBENCHSCREEN;
if((Window = OpenWindow(&NewWindow)) == NULL)
exit(FALSE);
for(i = 0; i < 800000; i++) /* Small Pause */
;
CloseWindow(Window);
CloseLibrary(IntuitionBase);
exit(TRUE);
}